<?php

use think\migration\Migrator;
use think\migration\db\Column;

class AlterSettleTakeoutAddSettleStatus extends Migrator
{
    public function up()
    {
        $sql = <<<SQL
ALTER TABLE `takeout_order`
ADD COLUMN `settle_status`  tinyint(1) NULL DEFAULT 1 COMMENT '结算状态1 无需结算 2 待结算 3 已结算',
ADD COLUMN `settle_at`  timestamp NULL COMMENT '结算时间' ;


SQL;
        $this->execute($sql);

    }

    public function down()
    {
        $this->table('takeout_order')
            ->removeColumn('settle_status')
            ->removeColumn('settle_at');
    }
}
